import com.dongchedi.utils.constant.RedisConstantKey;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;

import javax.annotation.Resource;
import java.time.LocalDate;
import java.util.concurrent.TimeUnit;

@SpringBootTest
@Slf4j
/**
 * @author leibidong
 * @description 测试
 * @date 2021/6/29
 */
public class test {
    @Resource
    RedisTemplate<String,Object> redisTemplate;
    @Test
    public void tt(){
     redisTemplate.opsForValue().set("1",1,260000, TimeUnit.SECONDS);
     redisTemplate.opsForValue().set("1",2,260000, TimeUnit.SECONDS);
        System.out.println(redisTemplate.opsForValue().get("1"));
    }
}
